package com.david.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.UUID;

/**
 * @Description: PaymentController
 * @Author: wangwei+
 * @CreateDate: 2022/1/13 11:04
 */
@RestController
@Slf4j
public class PaymentController {


    @Value("${server.port}")
    private  String serverPort;


    @GetMapping("/payment/rt")
    public String rt() throws InterruptedException {

        //Thread.sleep(1000);
        return "rt :"+serverPort+"  >> "+ UUID.randomUUID().toString();
    }
    @GetMapping("/payment/consul")

    public String paymentConsul(){
        return "springcloud with consul:"+serverPort+"  >> "+ UUID.randomUUID().toString();
    }

    public String paymentConsulHandler(){

        return "paymentConsulHandler with consul:"+serverPort+"  >> "+ UUID.randomUUID().toString();
    }
}

